Skip to content

Update diagnosis tests#382

Merged
AnilSorathiya merged 3 commits intomainfrom
anilsorathiya/sc-10916/update-diagnosis-tests
Jun 26, 2025
Merged

Update diagnosis tests#382
AnilSorathiya merged 3 commits intomainfrom
anilsorathiya/sc-10916/update-diagnosis-tests

Conversation

@AnilSorathiya
Copy link
Contributor

Pull Request Description

Tests:

  • WeakspotsDiagnosis
  • OverfitDiagnosis

These tests takes all the listed all the feature columns for for plots and data. However, if columns are not numerical or categorical types, it doesn't produce good plots.

What and why?

To produce relevant output

How to test

Run quick start documentation notebook demo notebook. you can use your dataset to test further.

What needs special review?

Dependencies, breaking changes, and deployment notes

Release notes

Checklist

  • What and why
  • Screenshots or videos (Frontend)
  • How to test
  • What needs special review
  • Dependencies, breaking changes, and deployment notes
  • Labels applied
  • PR linked to Shortcut
  • Unit tests added (Backend)
  • Tested locally
  • Documentation updated (if required)
  • Environment variable additions/changes documented (if required)

@AnilSorathiya AnilSorathiya added the internal Not to be externalized in the release notes label Jun 20, 2025
@github-actions
Copy link
Contributor

PR Summary

This PR enhances the diagnostic functions in the test suite by ensuring that only numeric and categorical feature columns are processed. In the OverfitDiagnosis function, the code now concatenates numeric and categorical feature columns and raises an error if no valid columns are found. Similarly, the WeakspotsDiagnosis function has been modified to filter the feature columns based on the numeric and categorical columns available in the dataset, and to raise a ValueError if none remain. These changes help avoid issues when non-relevant feature columns are present and improve the accuracy of the analysis conducted by these functions.

Test Suggestions

  • Write tests to ensure that OverfitDiagnosis raises a ValueError when datasets[0] contains no numeric or categorical columns.
  • Verify that WeakspotsDiagnosis filters out non-numeric and non-categorical columns correctly and raises the appropriate error when the filtered list is empty.
  • Test the functions with a mix of valid and invalid columns to confirm that only the expected features are processed.
  • Ensure that the diagnostic functions continue to produce the expected outputs (e.g., figures, headers) when valid data is provided.

@AnilSorathiya AnilSorathiya requested a review from cachafla June 26, 2025 16:06
Copy link
Contributor

@juanmleng juanmleng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@AnilSorathiya AnilSorathiya merged commit 3a15eee into main Jun 26, 2025
7 checks passed
@AnilSorathiya AnilSorathiya deleted the anilsorathiya/sc-10916/update-diagnosis-tests branch June 26, 2025 21:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal Not to be externalized in the release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants